package tech.aistar.corejava.day16.regex;

import java.util.Scanner;
import java.util.regex.Pattern;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/8/5 0005
 */
public class PatternDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请您输入:>");
        String line = sc.nextLine();
        if(Pattern.matches("[0-9]+",line)){
            System.out.println("匹配");
        }else{
            System.out.println("不匹配!");
        }
    }
}
